import { Component, Inject } from '@angular/core';
import { IonicPage, NavParams } from 'ionic-angular';

/** 我的工作照
 */
@IonicPage()
@Component({
  selector: 'page-work-photo',
  templateUrl: 'work-photo.html',
})
export class WorkPhotoPage {

  // 工作照片
  private workingImg: Array<any> = [];
  constructor(
    public navParams: NavParams,
    @Inject('user') private userService,
  )
  {
    debugger;
    this.workingImg= [...this.navParams.get('workingImg')];
  }

  ionViewDidLoad()
  {}

  /*** 选择了图片
  * */
  imagesSelected(event): void
  {
    debugger;
    this.workingImg= [...event.value];
  }

  /*** 执行文件上传
  * */
  executeUploadImages(): void
  {
    debugger;
    this.userService.uploadWorkImages(this.workingImg);
  }
}
